<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<link rel="stylesheet" media="screen" href="css/docs.css"/>
<link rel="stylesheet" media="screen" href="lib/jqplot/jquery.jqplot.min.css"/>
<!-- jQplot SETUP -->
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/jqplot/excanvas.js"></script>
<![endif]-->
<script type="text/javascript" src="lib/jqplot/jquery.jqplot.min.js"></script>
<script type="text/javascript" src="lib/jqplot/plugins/jqplot.categoryAxisRenderer.min.js"></script>
<script type="text/javascript" src="lib/jqplot/plugins/jqplot.barRenderer.min.js"></script>
<script type="text/javascript" src="lib/jqplot/plugins/jqplot.highlighter.min.js"></script>
<script type="text/javascript" src="lib/jqplot/plugins/jqplot.dateAxisRenderer.min.js"></script>
<script type="text/javascript" src="lib/jqplot/plugins/jqplot.pointLabels.min.js"></script>
<script type="text/javascript" src="lib/jqplot/plugins/jqplot.pieRenderer.min.js"></script>
<script type="text/javascript" src="lib/jqplot/plugins/jqplot.donutRenderer.min.js"></script>
<script type="text/javascript" src="lib/jqplot/plugins/jqplot.bubbleRenderer.min.js"></script>
<link rel="stylesheet" media="screen" href="lib/datatables/css/vpad.css"/>

<!-- jQplot SETUP END -->

<h1 class="page-title">量化数据输入</h1>

<%@include file="/WEB-INF/pages/exam/exam_common_quan_period.jsp"%>

<%@include file="/WEB-INF/pages/exam/exam_quan_chart_period.jsp"%>

<div class="container_12 clearfix leading">
    <section class="tabs grid_6 leading">

        <header>
            <h2>未审核</h2>
        </header>
        <ul class="clearfix">

        </ul>
        <section>

            <section class="clearfix" style="display: block;">
                <header>

                </header>
                <div id="un_audit_list" class="clearfix"></div>
            </section>

        </section>
    </section>
    <section class="tabs grid_6 leading">
        <header>
            <h2>已审核</h2>
            <span id="aaa"></span>
        </header>
        <ul class="clearfix">

        </ul>
        <section>
            <section class="clearfix" style="display: block;">
                <header>

                </header>
                <div id="has_audit_list" class="clearfix"></div>
            </section>

        </section>
    </section>
</div>

<div class="clear"></div>

<script type="text/javascript">
    $(function(){
        setTimeout("loadControlPage()", 600);
    });

    function loadListContent(url, listId) {
        if(listId == undefined){
            if(url.indexOf("quan_un_audit_list") > 0){
                listId = "un_audit_list";
            }else if(url.indexOf("quan_has_audit_list") > 0){
                listId = "has_audit_list";
            }
        }

        var data = {
            "organizationId":currentSelOrgId,
            "examPeriodEnum":$("#sel_periodtype").val(),
            "examPeriodStr":$("#sel_period").val()
        }
        //alert(data.organizationId+":"+data.examPeriodEnum+":"+data.examPeriodStr)

        //refreshListContent(url, data);
        $.ajax(url, {
            type:"POST",
            //data:{"organizationId":organizationId},
            data:data,
            dataType:"html",
            cache:false,
            success:function (a) {
                var obj = $("#"+listId);
                obj.html("");
                obj.html(a);
            },
            complete:function () {
            }
        });
    }

    function loadControlPage(actionUrl){
        loadListContent('/exam/quan_un_audit_list.xhtml', 'un_audit_list');	//加载未审核
        loadListContent('/exam/quan_has_audit_list.xhtml', 'has_audit_list');	//加载已审核

        $("#un_audit_total").val("");
        $("#has_audit_total").val("");
        initChart();
    }

    function initChart(){
        var un_audit_total = $("#un_audit_total").val();
        var has_audit_total = $("#has_audit_total").val();

        if(un_audit_total >=0 && has_audit_total >= 0 && un_audit_total != undefined && un_audit_total.length > 0 && has_audit_total != undefined && has_audit_total.length > 0){
            setChatDatas(has_audit_total, un_audit_total, $("#sel_periodtype").val());
        }else{
            setTimeout("initChart()", 500);
        }
    }
</script>
